package com.zerowidth.db.op;

import com.zerowidth.db.DBHelper;
import com.zerowidth.db.utils.TimeUtils;

public class LogDB {

    public static boolean insert(String logMsg) {
        String time = TimeUtils.convert(System.currentTimeMillis(), TimeUtils.TIME_FORMAT_YYYY_MM_DD_HH_MM_SS_SSS);
        String sql = String.format("INSERT INTO log (create_time, log) VALUES('%s', '%s')", time, logMsg);

        return DBHelper.executeInsert(sql) > 0;
    }

}
